const router = require('express').Router()
const { ProjectListByTitle, ProjectDetail } = require('../../handler/projects')

router.get('/search', (req, res) => {
  ProjectListByTitle(req.query).then(result => res.send(result)).catch(err => res.send(error('服务异常')))
})

router.get('/getProjectInfo', (req, res) => {
  ProjectDetail(req.query).then(result => res.send(result)).catch(err => res.send(error('服务异常')))
})

module.exports = router